package org.ch02.hw.demo12;

/**
 * @author ZJL
 * @date 2025-03-25
 */
public class MainTest {
    public static void main(String[] args) {
        Person p1 = new Person();
        BeanUtil.setProperty(p1,"age",21);
        BeanUtil.setProperty(p1,"name","张三");
        System.out.println("年龄："+BeanUtil.getProperty(p1,"age"));
        System.out.println("姓名："+BeanUtil.getProperty(p1,"name"));
//        System.out.println(person);
        Person p2 = new Person();
        BeanUtil.copyProperties(p1,p2);
        System.out.println("p2:"+p2);
    }
}
